class Solution(object):
    def lengthOfLastWord(self, s):
        """
        :type s: str
        :rtype: int
        """
        s = s.strip()
        return len(s) - s.rfind(' ') - 1

s = Solution()
r = s.lengthOfLastWord("")
print(r)



